home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 11 - 1995 / 11.04 Apr 95 / Performance / Fractal 1 / Fractal.h < prev    next >
Encoding:
Text File  |  1994-11-13  |  2.1 KB  |  91 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:            Fractal.h
  3.     
  4.     Used to build:    “Fractal 1”
  5.     
  6.     Written by:        Jim Cathey            July 1985
  7.                     Eric Traut            November 1994
  8.  
  9.     Description:
  10.         See comments in the file “FractalMain.c” for more
  11.         information.
  12. */
  13.  
  14.  
  15. /* Menu information */
  16. enum {
  17.     kMenuBarID            = 128,
  18.     kAppleMenuID        = 128,
  19.     kAboutBoxItem        = 1,
  20.     kFileMenuID            = 129,
  21.     kNewFractalItem        = 1,
  22.     kQuitItem            = 3,
  23.     kEditMenuID            = 130,
  24.     kOptionsMenuID        = 131,
  25.     kSetupItem            = 1,
  26.     kContinuousItem        = 3
  27. };
  28.  
  29. /* Window, dialog, and alert constants */
  30. enum {
  31.     kMainWindowID            = 260,
  32.     kAboutBox1DialogID        = 256,
  33.     kAboutBoxOKButtonID        = 1,
  34.     kAboutBoxMoreButtonID    = 2,
  35.     kAboutBox2DialogID        = 257,
  36.     kFatalErrorAlertID        = 128
  37. };
  38.  
  39. /* Setup dialog constants */
  40. enum {
  41.     kSetUpDialogID            = 258,
  42.     kSetUpOKButtonID        = 1,
  43.     kSetUpCancelButtonID    = 2,
  44.     kSetUpLevelID            = 4,
  45.     kSetUpMtnButtonID        = 5,
  46.     kSetUpHillsButtonID        = 6,
  47.     kSetUpWaterButtonID        = 7
  48. };
  49.  
  50. /* Style and level constants */
  51. enum {
  52.     kStyleMountains            = kSetUpMtnButtonID,
  53.     kStyleHills                = kSetUpHillsButtonID,
  54.     kStyleWater                = kSetUpWaterButtonID,
  55.     kMaxLevel                = 7,
  56.     kDefaultStyle            = kStyleWater,
  57.     kDefaultLevel            = 6
  58. };
  59.  
  60. enum {
  61.     kMaxXPoint                = ((1 << kMaxLevel) + 1),
  62.     kMaxYPoint                = ((1 << (kMaxLevel - 1)) + 1)
  63. };
  64.  
  65. /* Screen constants */
  66. enum {
  67.     kOriginalScreenX        = 512,
  68.     kOriginalScreenY        = 300,
  69.     kNewScreenX                = 630,
  70.     kNewScreenY                = 434,
  71.     kScreenBoundaryBits        = 5,
  72.     kWindowTitleHeight        = 16
  73. };
  74.  
  75. /* Global variables used in multiple files */
  76. extern short (*gPointArray)[kMaxXPoint][kMaxYPoint];
  77.                                             /* The array of points to be subdivided. */
  78. extern short gContourType;                    /* Contour type */
  79. extern short gContourLevel;                    /* Level of detail */
  80. extern short gMainWindowHeight;                /* Height of main window */
  81. extern short gMainWindowWidth;                /* Width of main window */
  82. extern long gTotalTickCount;                /* Total time spent calculating and drawing */
  83. extern long gTotalFractals;                    /* Total fractal count */
  84. extern Boolean gTimeUpdate;                    /* Should this screen update be counted? */
  85.  
  86. /* Functions used in multiple files */
  87. extern void CalcSurface(short level);
  88. extern void PlotData(void);
  89.  
  90.  
  91.